package com.qf.service.goodsservice.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.bean.goodsbean.Goodsgroup;
import com.qf.dao.goodsdao.GoodsgroupMapper;
import com.qf.service.goodsservice.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsgroupMapper goodsgroupMapper;


    @Override
    public PageInfo<Goodsgroup> findgoodsgroups(String groupname, int index, int size) {
        PageHelper.startPage(index,size);
        List<Goodsgroup> goodsgroupList = goodsgroupMapper.findgoodsgroups(groupname);
        PageInfo<Goodsgroup> goodsgroupPageInfo = new PageInfo<Goodsgroup>(goodsgroupList);
        return goodsgroupPageInfo;
    }
}
